{% extends 'base.html' %}

{% block right %}
    <div class="col-md-12 page-body">

        <div class="row">

            <div class="sub-title">
                <h2>最近文章</h2>
                <a href="{{ url_for('blog.blog_list') }}" title="归档"><i class="icon-list"></i></a>
            </div>

            <div class="col-md-12 content-page">

                {% for blog in latest_blog_list %}
                <!-- Blog Post Start -->
                <div class="col-md-12 blog-post">
                    <div class="post-title">
                        <a href="{{ url_for('blog.blog_detail', blog_suffix=blog.url_suffix) }}">
                            <h2>{{ blog.title }}</h2></a>
                    </div>
                    <div class="post-info">
                        <span>{{ blog.publish_time }} / by <a href="#" target="_blank">{{ blog.user.nickname }}</a></span>
                        <div class="pull-right">
                            <a href="{{ url_for('blog.blog_list', category_id=blog.category_id) }}">
                                {{ blog.category.name }}
                            </a>
                            <i class="icon-eye blue-color padding-left-20"></i>
                            <span>{{ blog.blogviews.count() }}</span>
                            <i class="glyphicon glyphicon-heart red-color"></i>
                            <span>{{ blog.bloglikes.count() }}</span>
                        </div>
                    </div>
                    <p>{{ blog.description }}</p>
                    <a href="{{ url_for('blog.blog_detail', blog_suffix=blog.url_suffix) }}" class="button button-style button-anim fa fa-long-arrow-right"><span>阅读全文</span></a>
                </div>
                <!-- Blog Post End -->
                {% endfor %}


                <div class="col-md-12 text-center">
                    <a href="javascript:void(0)" id="load-more-post" class="load-more-button">Load</a>
                    <div id="post-end-message"></div>
                </div>

            </div>

        </div>

    </div>

    {{ super() }}

{% endblock %}